
import _request from "../../common/_request";
import {Message} from "element-ui";

let lib_channel = {

    module : 'library.channel',

    //加载链接渠道
    link_list : function (callback){
        let params = _request._params(this.module, 'link_list');
        _request._post(params, function(response){
            if (response.code !== _request.success) {
                Message.info(response.msg);
                return;
            }

            //回调数据
            callback(response.data)

        }, 0);
    },

    //加载链接渠道
    list : function (callback){
        let params = _request._params(this.module, 'list');
        _request._post(params, function(response){
            if (response.code !== _request.success) {
                Message.info(response.msg);
                return;
            }

            //回调数据
            callback(response.data)

        }, 0);
    },

}

export default lib_channel
